package com.blb.service.impl;

import com.blb.entity.Shelves;
import com.blb.mapper.ShelvesMapper;
import com.blb.service.IShelvesService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Date;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author HuaHao
 * @since 2019-11-14
 */
@Service
public class ShelvesServiceImpl extends ServiceImpl<ShelvesMapper, Shelves> implements IShelvesService {
    @Resource
    private ShelvesMapper shelvesMapper;

    @Override
    public List<Shelves> getAll() {
        return shelvesMapper.getAll();
    }
    /*模糊查询*/
    @Override
    public List<Shelves> getAllShelves(String nodeId,String nodeType,String companyId,String shelvesNo, String creatTime,int start,int length) {
        return shelvesMapper.getAllShelves(nodeId,nodeType,companyId,shelvesNo,creatTime,start,length);
    }

    @Override
    public int count(String nodeId,String nodeType,String companyId,String shelvesNo, String creatTime) {
        return shelvesMapper.count(nodeId,nodeType,companyId,shelvesNo,creatTime);
    }

    @Override
    public List<Shelves> getByGoodId(String damId) {
        return shelvesMapper.getByGoodId(damId);
    }

    @Override
    public void updateShelves(Shelves shelves) {
        shelvesMapper.updateShelves(shelves);
    }

    @Override
    public Shelves findShelvesById(String id) {
        return shelvesMapper.findShelvesById(id);
    }

    @Override
    public void updateShelvesStatus(String id, String status) {
        System.out.println(id);
        shelvesMapper.updateShelvesStatus(id,status);
    }
}
